package jam.network.message;

import jam.network.NetworkController;
import java.util.Scanner;

public class ResponseRegister extends ServerResponse {

	public static void process(String msg) {
		Scanner s = new Scanner(msg);
		s.useDelimiter(":");

		//skip the keyword and id
		s.next();
		int id = s.nextInt();

		//clean up hasmap
		NetworkController.sent.remove(id);

		String result = s.next();

		if (result.equalsIgnoreCase("TRUE"))
			System.out.println("Registration successful, update UI");
		else
			System.out.println("Registration failed, show this in UI too");
		}
}